import Vue from "vue";
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
        user_islogin: false,
        user_username: "",
        admin_islogin: false,
        admin_username: "",
        topshow: false,
        bottomshow: false
    },
    mutations: {
        change(state) {
            state.topshow = !state.topshow;
            state.bottomshow = !state.bottomshow
        },
        userlogin(state, username) {
            state.user_islogin = !state.user_islogin;
            state.user_username = username
        }
    },
    actions: {},
    getters: {},
    modules: {

    }

})

export default store